#ifndef PERSON_H
#define PERSON_H

#include <string>
#include <iostream>

class Person
{
friend std::istream &readPerson(std::istream&, Person&);
friend std::ostream &printPerson(std::ostream&, const Person&);
public:       
    // 构造函数
    Person() = default;
    Person(const std::string &name, const std::string &address)
    {
        strName = name;
        strAddress = address;
    }
    Person(std::istream &is) { is >> *this; }
private: 
    // 数据成员
    std::string strName;
    std::string strAddress;
public:    
    // 成员函数
    std::string getName() const { return strName; };
    std::string getdAddress() const { return strAddress; };
};
/**
 * @brief 接口函数声明
 * 
 */

std::istream &readPerson(std::istream &is, Person &p);
std::ostream &printPerson(std::ostream &os, const Person &p);

#endif
